package com.no1.musicmgr.service;

import com.no1.musicmgr.entity.reCollection;
import com.no1.musicmgr.mapper.CollectionMapper;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
@Log4j
public class CollectionService {
    @Autowired
    private  CollectionMapper collectionMapper;
    public boolean insert(reCollection reCollection) {
        return collectionMapper.insert(reCollection);
    }
    public boolean deleteById(Integer collectionId) {
        return collectionMapper.deleteById(collectionId);
    }

    public boolean update(reCollection reCollection) {
        return collectionMapper.update(reCollection);
    }

    public reCollection selectById(Integer collectionId) {
        return collectionMapper.selectById(collectionId);
    }
    public ArrayList<reCollection> list(reCollection reCollection) {
        return collectionMapper.list(reCollection);
    }
}
